//
//  AGImagePickerControllerDefines.h
//  AGImagePickerController
//
//  Created by Artur Grigor on 28.02.2012.
//  Copyright (c) 2012 - 2013 Artur Grigor. All rights reserved.
//  
//  For the full copyright and license information, please view the LICENSE
//  file that was distributed with this source code.
//  

#pragma mark ARC

#if __has_feature(objc_arc_weak)
    #define ag_weak weak
    #define __ag_weak __weak
#elif __has_feature(objc_arc)
    #define ag_weak unsafe_unretained
    #define __ag_weak __unsafe_unretained
#else
    #define ag_weak
    #define __ag_weak
#endif


#define IS_IPAD()   ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)


#define SHOULD_CHANGE_STATUS_BAR_STYLE                                          1
#define SHOULD_SHOW_SAVED_PHOTOS_ON_TOP                                         1



#define AGIPC_ITEM_WIDTH_PAD                                                    (fmin([UIScreen mainScreen].bounds.size.width, 88.f))
#define AGIPC_ITEM_HEIGHT_PAD                                                   AGIPC_ITEM_WIDTH_PAD
#define AGIPC_ITEM_SIZE_PAD                                                     CGSizeMake(AGIPC_ITEM_WIDTH_PAD, AGIPC_ITEM_HEIGHT_PAD)

#define AGIPC_ITEM_WIDTH                                                        (fmin([UIScreen mainScreen].bounds.size.width, 75.f))
#define AGIPC_ITEM_HEIGHT                                                       AGIPC_ITEM_WIDTH
#define AGIPC_ITEM_SIZE                                                         CGSizeMake(AGIPC_ITEM_WIDTH, AGIPC_ITEM_HEIGHT)

#pragma mark - Types

typedef void (^AGIPCDidFinish)(NSArray *info);
typedef void (^AGIPCDidFail)(NSError *error);

typedef NS_ENUM(NSUInteger, AGDeviceType)
{
    AGDeviceTypeiPad,
    AGDeviceTypeiPhone
};

typedef NS_ENUM(NSUInteger, AGImagePickerControllerSelectionMode)
{
    AGImagePickerControllerSelectionModeSingle,
    AGImagePickerControllerSelectionModeMultiple
};

typedef NS_ENUM(NSUInteger, AGImagePickerControllerSelectionBehaviorType)
{
    AGImagePickerControllerSelectionBehaviorTypeCheckbox,
    AGImagePickerControllerSelectionBehaviorTypeRadio
};